package com.smit.icastplus;

import android.content.Context;

import com.smit.adapter.DVBAdapter;
import com.smit.adapter.DVBDeviceManager;
import com.smit.utils.LogUtil;

/**
 * icast plus初始化
 */
public class ICastPlusInitializer {
    private static final String TAG = "ICastPlusInitializer";
    /**
     * 获取对象
     * @return ICastPlusInitializer对象
     */
    public static ICastPlusInitializer getInstance() {
        return SingletonHolder.instance;
    }

    /**
     * 初始化icast plus
     * @param context Android application context
     * @param appID 分配给合作开发的应用ID
     * @param appKey 分配给合作开发的应用Key
     */
    public void initializeICastPlus(Context context, String appID, String appKey) {
        LogUtil.info(TAG, "initializeICastPlus start>>>");
        DVBAdapter.getInstance().initialize(context, appID, appKey);
        DVBAdapter.getInstance().getDVBDeviceManager().setDeviceType(DVBDeviceManager.DVB_DEVICE_ICAST_PLUS);
        LogUtil.info(TAG, "initializeICastPlus end<<<");
    }

    private static class SingletonHolder {
        private static ICastPlusInitializer instance = new ICastPlusInitializer();
    }
}